<!--
 * @Author: 曹捷
 * @Date: 2020-08-04 16:29:57
 * @LastEditors: 曹捷
 * @LastEditTime: 2021-03-03 10:01:15
 * @Description: 分页 加载更多组件和 为空提示
 需要配合pageLoadMore MIX
 
-->
<template>
  <obit-nodata :desText="pageInfo.nodata" v-if="info.loadStatus === 'noMore' && info.dataList.length === 0" />
  <uni-load-more :color="pageInfo.loadColor" :contentText="pageInfo.loadText" :iconType="pageInfo.iconType"
    :status="pageInfo.loadStatus" @clickLoadMore="pageInfo.loadMore" v-else-if="pageInfo.loadStatus" />
</template>

<script>
export default {
  inject: ['info'],
  data() {
    return {}
  },
  computed: {
    // 兼容小程序
    pageInfo() {
      let res = {
        nodata: this.info.nodata,
        loadText: this.info.loadText,
        loadColor: this.info.loadColor,
        iconType: this.info.iconType,
        loadStatus: this.info.loadStatus,
        loadMore: this.info.loadMore,
      }
      return res
    },
  },
}
</script>

<style></style>
